3.2.19 \(\int \frac {\text {ArcTan}(a x)^2}{c x-i a c x^2} \, dx\) [119]

Optimal. Leaf size=76 \[ \frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \text {ArcTan}(a x) \text {PolyLog}\left (2,-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {PolyLog}\left (3,-1+\frac {2}{1-i a x}\right )}{2 c} \]

[Out]

arctan(a*x)^2*ln(2-2/(1-I*a*x))/c-I*arctan(a*x)*polylog(2,-1+2/(1-I*a*x))/c+1/2*polylog(3,-1+2/(1-I*a*x))/c

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {1607, 4988, 5004, 5112, 6745} \begin {gather*} -\frac {i \text {ArcTan}(a x) \text {Li}_2\left (\frac {2}{1-i a x}-1\right )}{c}+\frac {\text {ArcTan}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (\frac {2}{1-i a x}-1\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[ArcTan[a*x]^2/(c*x - I*a*c*x^2),x]

[Out]

(ArcTan[a*x]^2*Log[2 - 2/(1 - I*a*x)])/c - (I*ArcTan[a*x]*PolyLog[2, -1 + 2/(1 - I*a*x)])/c + PolyLog[3, -1 +
2/(1 - I*a*x)]/(2*c)

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 4988

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Simp[(a + b*ArcTan[c*x])
^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Dist[b*c*(p/d), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))
]/(1 + c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5112

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[I*(a + b*ArcTa
n[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] - Dist[b*p*(I/2), Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 - u]
/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - 2*(I
/(I + c*x)))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps

\begin {align*} \int \frac {\tan ^{-1}(a x)^2}{c x-i a c x^2} \, dx &=\int \frac {\tan ^{-1}(a x)^2}{x (c-i a c x)} \, dx\\ &=\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {(2 a) \int \frac {\tan ^{-1}(a x) \log \left (2-\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {(i a) \int \frac {\text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{1+a^2 x^2} \, dx}{c}\\ &=\frac {\tan ^{-1}(a x)^2 \log \left (2-\frac {2}{1-i a x}\right )}{c}-\frac {i \tan ^{-1}(a x) \text {Li}_2\left (-1+\frac {2}{1-i a x}\right )}{c}+\frac {\text {Li}_3\left (-1+\frac {2}{1-i a x}\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 82, normalized size = 1.08 \begin {gather*} \frac {-i \pi ^3+16 i \text {ArcTan}(a x)^3+24 \text {ArcTan}(a x)^2 \log \left (1-e^{-2 i \text {ArcTan}(a x)}\right )+24 i \text {ArcTan}(a x) \text {PolyLog}\left (2,e^{-2 i \text {ArcTan}(a x)}\right )+12 \text {PolyLog}\left (3,e^{-2 i \text {ArcTan}(a x)}\right )}{24 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[ArcTan[a*x]^2/(c*x - I*a*c*x^2),x]

[Out]

((-I)*Pi^3 + (16*I)*ArcTan[a*x]^3 + 24*ArcTan[a*x]^2*Log[1 - E^((-2*I)*ArcTan[a*x])] + (24*I)*ArcTan[a*x]*Poly
Log[2, E^((-2*I)*ArcTan[a*x])] + 12*PolyLog[3, E^((-2*I)*ArcTan[a*x])])/(24*c)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 192 vs. \(2 (70 ) = 140\).
time = 0.35, size = 193, normalized size = 2.54

method result size
derivativedivides \(\frac {\frac {a \arctan \left (a x \right )^{2} \ln \left (1+\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}-\frac {2 i a \arctan \left (a x \right ) \polylog \left (2, -\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {2 a \polylog \left (3, -\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {a \arctan \left (a x \right )^{2} \ln \left (1-\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}-\frac {2 i a \arctan \left (a x \right ) \polylog \left (2, \frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {2 a \polylog \left (3, \frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}}{a}\) \(193\)
default \(\frac {\frac {a \arctan \left (a x \right )^{2} \ln \left (1+\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}-\frac {2 i a \arctan \left (a x \right ) \polylog \left (2, -\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {2 a \polylog \left (3, -\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {a \arctan \left (a x \right )^{2} \ln \left (1-\frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}-\frac {2 i a \arctan \left (a x \right ) \polylog \left (2, \frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}+\frac {2 a \polylog \left (3, \frac {i a x +1}{\sqrt {a^{2} x^{2}+1}}\right )}{c}}{a}\) \(193\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctan(a*x)^2/(c*x-I*a*c*x^2),x,method=_RETURNVERBOSE)

[Out]

1/a*(a/c*arctan(a*x)^2*ln(1+(1+I*a*x)/(a^2*x^2+1)^(1/2))-2*I*a/c*arctan(a*x)*polylog(2,-(1+I*a*x)/(a^2*x^2+1)^
(1/2))+2*a/c*polylog(3,-(1+I*a*x)/(a^2*x^2+1)^(1/2))+a/c*arctan(a*x)^2*ln(1-(1+I*a*x)/(a^2*x^2+1)^(1/2))-2*I*a
/c*arctan(a*x)*polylog(2,(1+I*a*x)/(a^2*x^2+1)^(1/2))+2*a/c*polylog(3,(1+I*a*x)/(a^2*x^2+1)^(1/2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="maxima")

[Out]

1/96*(8*I*arctan(a*x)^3 - 12*arctan(a*x)^2*log(a^2*x^2 + 1) - 6*I*arctan(a*x)*log(a^2*x^2 + 1)^2 + log(a^2*x^2
 + 1)^3 + 24*I*(arctan(a*x)^3/c + 4*a*integrate(1/16*x*log(a^2*x^2 + 1)^2/(a^2*c*x^3 + c*x), x) - 16*integrate
(1/16*arctan(a*x)*log(a^2*x^2 + 1)/(a^2*c*x^3 + c*x), x))*c + 96*c*integrate(1/16*(4*a*x*arctan(a*x)*log(a^2*x
^2 + 1) + 12*arctan(a*x)^2 + log(a^2*x^2 + 1)^2)/(a^2*c*x^3 + c*x), x))/c

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="fricas")

[Out]

integral(-1/4*I*log(-(a*x + I)/(a*x - I))^2/(a*c*x^2 + I*c*x), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \int \frac {\operatorname {atan}^{2}{\left (a x \right )}}{a x^{2} + i x}\, dx}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atan(a*x)**2/(c*x-I*a*c*x**2),x)

[Out]

I*Integral(atan(a*x)**2/(a*x**2 + I*x), x)/c

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctan(a*x)^2/(c*x-I*a*c*x^2),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atan}\left (a\,x\right )}^2}{c\,x-a\,c\,x^2\,1{}\mathrm {i}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(atan(a*x)^2/(c*x - a*c*x^2*1i),x)

[Out]

int(atan(a*x)^2/(c*x - a*c*x^2*1i), x)

________________________________________________________________________________________